package com.kznnc.data_structure.structure.arraystructure;

import java.util.ArrayDeque;

/**
 * @Description
 * @Author houchenkai
 * @Created Date: 2021/3/31 14:22
 * @ClassName
 */
public class ArrayTest {

   /* public static void main(String[] args) {
        ArrayStructure<Integer> arrayStructure = new ArrayStructure<>(6);
        for (int i = 0; i <5; i++) {
            arrayStructure.add(i);
        }
        System.out.println("数组实际存储元素的个数:"+arrayStructure.capacity);
        System.out.println("缩容前数组的大小:"+arrayStructure.length);
        arrayStructure.delete(0);
        arrayStructure.delete(0);
        System.out.println("缩容后数组的大小:"+arrayStructure.length);
        for (int i = 0; i <arrayStructure.length ; i++) {
            System.out.println(arrayStructure.get(i));
        }
    }*/

    public static void main(String[] args) {
        ArrayDeque<Integer> arrayDeque = new ArrayDeque<Integer>(9);
        arrayDeque.addLast(1);
        arrayDeque.addLast(2);
        System.out.println(arrayDeque.peekLast()); // =2
    }


}
